# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=deepin-grand-search
pkgver=5.3.2
pkgrel=3
pkgdesc='System-wide desktop search for DDE'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/dde-grand-search"
license=('GPL3')
depends=(deepin-anything deepin-daemon deepin-qt5integration poppler-qt5)
makedepends=(cmake deepin-dock ninja qt5-tools)
groups=(deepin-extra)
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-grand-search/archive/$pkgver.tar.gz"
        $pkgname-application-path.patch::https://github.com/linuxdeepin/dde-grand-search/commit/3d3b3c7c62958dcc311b6055a4a9585745ad2d7a.patch)
sha512sums=('df6269053626fbb16b5b328809c04129fce7fb9c87e3593e180dc60b91962c078a2d4375a1613c4544f3be49fc2c8eb75d1ddedfcb2afe23f383d413be7b0a41'
            '5235c31c559d7b9c8d681edcf4f87ed5e26f6fd0f0a8ca92d5c2b2422f314466e0d4d445a18c11a68cef3134eea2eb966d7c5e074d8bbb9816cf2a87aafe3afb')

prepare() {
  cd dde-grand-search-$pkgver
  patch -p1 -i ../$pkgname-application-path.patch
}

build() {
  cd dde-grand-search-$pkgver
  cmake -GNinja .
  ninja
}

package() {
  cd dde-grand-search-$pkgver
  DESTDIR="$pkgdir" ninja install
}
